package virtualstock.request;
import java.util.List;

import javax.ejb.Remote;

import virtualstock.exception.GameNotFoundException;
import virtualstock.exception.InvalidParameterException;
import virtualstock.exception.PlayerNotFoundException;
import virtualstock.exception.PortfolioNotFoundException;
import virtualstock.util.GameDetails;

@Remote
public interface GameController {
	
	public void addPlayerToGame(Long playerID, Long gameID) throws InvalidParameterException, PlayerNotFoundException, GameNotFoundException, PortfolioNotFoundException;
	
	public Long createNewGame(GameDetails details) throws PlayerNotFoundException, InvalidParameterException;
	
	public List<GameDetails> getGamesOfPlayer(Long playerID) throws InvalidParameterException, PlayerNotFoundException;
	
	public GameDetails getGameDetails(Long gameID) throws InvalidParameterException, GameNotFoundException;
	
	public void removeGame(Long gameID) throws InvalidParameterException, GameNotFoundException;
	
	public void removePlayerFromGame(Long playerID, Long gameID) throws InvalidParameterException, PlayerNotFoundException, GameNotFoundException;
	
	public void addStockToGame(Long stockID, Long gameID);
	
	public void removeStockFromGame(Long stockID, Long gameID);
	
	public List<Long> getStockIDs(Long gameID);
	
	public List<Long> getPlayerIDs(Long gameID) throws InvalidParameterException, GameNotFoundException;

	public List<GameDetails> getAllAvailableGames();

}
